package com.topisv.tms.repository.stock.reverse;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.topisv.tms.entity.stock.reverse.ReverseBillItem;

/**
 * 冲正单明细_dao
 * @author ch
 *
 */
public abstract interface ReverseBillItemDao extends PagingAndSortingRepository<ReverseBillItem, Long>, JpaSpecificationExecutor<ReverseBillItem>
{

	@Query("select t from ReverseBillItem t where t.billCode=?")
	List<ReverseBillItem> loadByBillCode(String billCode);

	@Query("select t from ReverseBillItem t where t.billCode=? and t.status='undo' ")
	List<ReverseBillItem> loadUnreverseItemByBillCode(String billCode);

}